{% extends "base.html" %}
{% block content %}
    <h1>{{ penalty.title if penalty.title else "Penalty Details" }}</h1>
    <form method="POST">
        {{ form.hidden_tag() }}
        <div class="form-columns">
            <!-- 第一列 -->
            <div class="form-column">
                <div>
                    {{ form.site.label }}<br>
                    {{ form.site(size=20) }}<br>
                    {% for error in form.site.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.url.label }}<br>
                    {{ form.url(size=20) }}<br>
                    {% for error in form.url.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.title.label }}<br>
                    {{ form.title(size=20) }}<br>
                    {% for error in form.title.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.case_no.label }}<span style="color: red;">*</span><br>
                    {{ form.case_no(size=20) }}<br>
                    {% for error in form.case_no.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.criminal_type.label }}<br>
                    {{ form.criminal_type(size=20) }}<br>
                    {% for error in form.criminal_type.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.criminal_content.label }}<br>
                    {{ form.criminal_content(cols=20, rows=4) }}<br>
                    {% for error in form.criminal_content.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.penalty_basis.label }}<br>
                    {{ form.penalty_basis(size=20) }}<br>
                    {% for error in form.penalty_basis.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.penalty_category.label }}<br>
                    {{ form.penalty_category(size=20) }}<br>
                    {% for error in form.penalty_category.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.penalty_content.label }}<br>
                    {{ form.penalty_content(size=20) }}<br>
                    {% for error in form.penalty_content.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
            </div>

            <!-- 第二列 -->
            <div class="form-column">
                <div>
                    {{ form.forfeit.label }}<br>
                    {{ form.forfeit(size=20) }}<br>
                    {% for error in form.forfeit.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.confiscation.label }}<br>
                    {{ form.confiscation(size=20) }}<br>
                    {% for error in form.confiscation.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.revoke_cert.label }}<br>
                    {{ form.revoke_cert(size=20) }}<br>
                    {% for error in form.revoke_cert.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.judge_date.label }}<span style="color: red;">*</span><br>
                    {{ form.judge_date(size=20) }}<br>
                    {% for error in form.judge_date.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.admin_org.label }}<br>
                    {{ form.admin_org(size=20) }}<br>
                    {% for error in form.admin_org.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.admin_org_code.label }}<br>
                    {{ form.admin_org_code(size=20) }}<br>
                    {% for error in form.admin_org_code.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.source_org.label }}<br>
                    {{ form.source_org(size=20) }}<br>
                    {% for error in form.source_org.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.source_org_code.label }}<br>
                    {{ form.source_org_code(size=20) }}<br>
                    {% for error in form.source_org_code.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.counterpart.label }}<span style="color: red;">*</span><br>
                    {{ form.counterpart(size=20) }}<br>
                    {% for error in form.counterpart.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
            </div>

            <!-- 第三列 -->
            <div class="form-column">
                <div>
                    {{ form.cp_type.label }}<br>
                    {{ form.cp_type(size=20) }}<br>
                    {% for error in form.cp_type.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.soc_code.label }}<br>
                    {{ form.soc_code(size=20) }}<br>
                    {% for error in form.soc_code.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.org_code.label }}<br>
                    {{ form.org_code(size=20) }}<br>
                    {% for error in form.org_code.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.reg_code.label }}<br>
                    {{ form.reg_code(size=20) }}<br>
                    {% for error in form.reg_code.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.tax_code.label }}<br>
                    {{ form.tax_code(size=20) }}<br>
                    {% for error in form.tax_code.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.unit_code.label }}<br>
                    {{ form.unit_code(size=20) }}<br>
                    {% for error in form.unit_code.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.org_reg_id.label }}<br>
                    {{ form.org_reg_id(size=20) }}<br>
                    {% for error in form.org_reg_id.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.legal_person.label }}<br>
                    {{ form.legal_person(size=20) }}<br>
                    {% for error in form.legal_person.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.lp_cert_type.label }}<br>
                    {{ form.lp_cert_type(size=20) }}<br>
                    {% for error in form.lp_cert_type.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
            </div>

            <!-- 第四列 -->
            <div class="form-column">
                <div>
                    {{ form.lp_cert_code.label }}<br>
                    {{ form.lp_cert_code(size=20) }}<br>
                    {% for error in form.lp_cert_code.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.cert_type.label }}<br>
                    {{ form.cert_type(size=20) }}<br>
                    {% for error in form.cert_type.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.cert_code.label }}<br>
                    {{ form.cert_code(size=20) }}<br>
                    {% for error in form.cert_code.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.update_date.label }}<br>
                    {{ form.update_date(size=20) }}<br>
                    {% for error in form.update_date.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.content.label }}<br>
                    {{ form.content(cols=20, rows=4) }}<br>
                    {% for error in form.content.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.note.label }}<br>
                    {{ form.note(cols=20, rows=4) }}<br>
                    {% for error in form.note.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.status.label }}<br>
                    {{ form.status(size=20) }}<br>
                    {% for error in form.status.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.subject_1.label }}<br>
                    {{ form.subject_1(size=20) }}<br>
                    {% for error in form.subject_1.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.subject_2.label }}<br>
                    {{ form.subject_2(size=20) }}<br>
                    {% for error in form.subject_2.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
            </div>

            <!-- 第五列 -->
            <div class="form-column">
                <div>
                    {{ form.district.label }}<br>
                    {{ form.district(size=20) }}<br>
                    {% for error in form.district.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.district_level.label }}<br>
                    {{ form.district_level(size=20) }}<br>
                    {% for error in form.district_level.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.org_type.label }}<br>
                    {{ form.org_type(size=20) }}<br>
                    {% for error in form.org_type.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.counterpart_type.label }}<br>
                    {{ form.counterpart_type(size=20) }}<br>
                    {% for error in form.counterpart_type.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.penalty_org_type.label }}<br>
                    {{ form.penalty_org_type(size=20) }}<br>
                    {% for error in form.penalty_org_type.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
                <div>
                    {{ form.penalty_person_type.label }}<br>
                    {{ form.penalty_person_type(size=20) }}<br>
                    {% for error in form.penalty_person_type.errors %}
                        <span style="color: red;">[{{ error }}]</span>
                    {% endfor %}
                </div>
            </div>
        </div>
        <div>
            {{ form.submit() }}
        </div>
    </form>
{% endblock %}